<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript" charset="utf-8">
	var datagrid;
	var id = '${id}';
	$(function() {
		datagrid = $('#datagrid').datagrid({
			url : '${pageContext.request.contextPath}/hygl/pointUsedRecordAction!noAuth_datagrid.html?model.mid='+id,
			title : '积分使用记录列表',
			iconCls : 'icon-save',
			pagination : true,
			pagePosition : 'bottom',
			pageSize : 10,
			pageList : [ 10, 20, 30, 40 ],
			fit : true,
			fitColumns : false,
			nowrap : false,
			border : false,
			idField : 'id',
			sortName : 'date',
			sortOrder : 'desc',
			checkOnSelect : false,
			selectOnCheck : true,
			columns : [ [  {
				title : '日期',
				field : 'date',
				width : 150
			}, {
				title : '单号',
				field : 'sserial',
				width : 150
			},{
				title : '数量',
				field : 'num',
				width : 150
			}] ]
		});

		var rid0 = $('#searchForm').find('input[name=rid]');
		var rid0Combobox = rid0.combobox({
			url : '${pageContext.request.contextPath}/rkgl/repertoryAction!noAuth_combobox.html',
			valueField : 'id',
			textField : 'name',
			multiple : false,
			editable : false,
			panelHeight : 'auto',
			onLoadSuccess : function() {
				parent.$.messager.progress('close');
			}
		});

	});

	
	

	
	function _search() {
		datagrid.datagrid('load', sy.serializeObject($('#searchForm')));
	}
	function cleanSearch() {
		datagrid.datagrid('load', {});
		$('#searchForm input').val('');
	}
</script>
</head>
<body class="easyui-layout" data-options="fit:true">
	<div data-options="region:'north',border:false,title:'搜索条件'" style="height: 80px;overflow: hidden;" align="left">
		<form id="searchForm">
			<table class="tableForm datagrid-toolbar" style="width: 100%;height: 100%;">
				<tr>
					<th style="width:80px;">起始时间</th>
					<td style="width:220px;"><input name="beginDate" class="easyui-datebox" data-options="editable:false" style="width:200px;" /></td>
					<th style="width:80px;">截止时间</th>
					<td style="width:220px;"><input name="endDate" class="easyui-datebox" data-options="editable:false" style="width:200px;" /></td>
				</tr>
				<tr>
					<th style="width:80px;">仓库</th>
					<td style="width:220px;"><input name="rid" style="width: 200px;" /></td>
					<td><a href="javascript:void(0);" class="easyui-linkbutton" onclick="_search();">搜索</a><a href="javascript:void(0);" class="easyui-linkbutton" onclick="cleanSearch();">取消</a></td>
				</tr>
			</table>
		</form>
	</div>
	<div data-options="region:'center',border:false" style="overflow: hidden;">
		<table id="datagrid"></table>
	</div>

	<div id="menu" class="easyui-menu" style="width:120px;display: none;">
	</div>
</body>
</html>